CC=g++
CFLAGS=-c -Wall -ggdb
LDFLAGS=-Wall -ggdb -lmingw32 -lSDLmain
EDLIBS= -lSDL -lSDL_net -lz
SOURCES=main.cpp level.cpp client.cpp server.cpp config.cpp spleef.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=WaterCraft

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(EDLIBS)

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@